import { createApp } from 'vue'
import { createPinia  } from "pinia";
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'
import App from './App.vue'
import router from './router'
import store from './store'
import 'dayjs/locale/zh-cn';//中文
import locale from "element-plus/es/locale/lang/zh-cn";//中文
import * as ElementPlusIconsVue from '@element-plus/icons-vue'
import mitt from 'mitt'
const Mit = mitt()
const app = createApp(App)

for (const [key, component] of Object.entries(ElementPlusIconsVue)) {
  app.component(key, component)
}
app.use(ElementPlus,{ locale })
const pinia = createPinia()
app.use(ElementPlus)
app.use(pinia)
// window.pinia = store;
app.config.globalProperties.$Bus = Mit
app.use(store).use(router).mount('#app')
